import React from 'react'
import { connect } from 'react-redux'
import { SubNavMenu, SubNavItem, SubNavSubItem } from 'components/navListMenv'
import { Header, Image } from 'semantic-ui-react'
import { global as globalDuck } from 'ducks'

const OrgNav = ({ user }) => {
  const { avatar } = user
  return (
    <SubNavMenu vertical tabular>
      <SubNavItem className="subnav top">
        <Header as="h2">
          <Image src={avatar} />
        </Header>
      </SubNavItem>

      <SubNavItem>
        <a>
          <span>任务中心</span>
        </a>
      </SubNavItem>
    </SubNavMenu>
  )
}

const mapStateToProps = state => ({
  user: globalDuck.selectors.user(state),
})

export default connect(mapStateToProps)(OrgNav)
